package com.wgy.day13.Anonymous匿名对象;

import java.util.Scanner;

public class Demo03Anonymous {
    public static void main(String[] args) {
        Scanner a=methodReturn();
        int b=a.nextInt();
        System.out.println("输入数字是:"+b);


    }
    public static Scanner methodReturn(){
        //正常对象写法
      //  Scanner sc=new Scanner(System.in);
      //  return sc;
        //匿名对象写法
        return new Scanner(System.in);
    };

};
